<?php
/**
 * @author yaya
 * 移除成员事件
 */
class RemovedKickCluster {
	private $message = "";
	private $auth = null;
	private $cp = null;
	function RemovedKickCluster() {
		$this->auth = new Authority();
		$this->cp = new ClusterParam();
	}

	function run() {

		 
			if ($_POST[Sender]=="1004634672") {
				@ DB :: Query("update td_cluster_favorable set `is_in_cluster`=0  where ClusterNum='{$_POST[ClusterNum]}'");
			}
			$arr = array (
				'qq' => $_POST[Sender],
				'ClusterNum' => $_POST[ClusterNum],
				'operate' => $_POST[Operator],
				'flag' => 0,
				'day' => date("Y-m-d H:i:s", time() + 8 * 3600)
			);
			@ DB :: SaveTableRow('td_REMOVED_recode', $arr);
			$REMOVEDFROMCLUSTER_MESS = $this->cp->getParamValue('REMOVEDFROMCLUSTER_MESS');
			$this->message = preg_replace(array (
				"/\{0\}/",
				"/\{1\}/",
				"/\{2\}/",
				"/\{3\}/",
				"/\{4\}/"
			), array (
				$_POST[OperatName],
				$_POST[Nick],
				$_POST[ClusterName],
				$_POST[ClusterNum],
				$_POST[Sender]
			), $REMOVEDFROMCLUSTER_MESS);
		 

	}
	
	private function __get($property_name) {
		return $this-> $property_name;
	}

	private function __set($property_name, $value) {
		$this->$property_name = $value;
	}
}
?>